'use strict'
const fs = require('fs');

class template {

    constructor() {
        this.param = '/'
    }
    //创建资源
    async get(c) {
        try {
            let r3 =await c.service.psql.query( `select * from sticker`);
            if(r3.rowCount==0){
                return c.send('no data');
            }
            var obj ={
                sticker:r3.rows
            }
            c.send(obj);
            return
        }
        catch (err) {
            c.status(400).send('error');
        }
    }

}


module.exports = template
